package cn.wen233.order.api;

import cn.wen233.common.api.R;
import cn.wen233.domain.Order;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wenei
 * @date 2021-06-05 14:13
 */
@RestController
@RequestMapping("/orders")
public class OrderApi {

    @GetMapping("/{id}")
    public R<?> getOrderById(@PathVariable String id) {
        Order order = Order.builder()
                .id(id)
                .address("湖南")
                .description("描述什么呀,这是第一个服务")
                .amount(3)
                .build();
        return R.success(order);
    }
}
